const fp = require('lodash/fp');
const {Maybe, Container } = require('../support');
let maybe = Maybe.of([5, 6, 1]);

// 解一： 直接通过 maybe._value 获取数据
// let ex1 = () => {
//     return fp.map(fp.add(1), maybe._value);
// }
// console.log(ex1());

// 解二：通过maybe.map ,返回一个函子，再获取通过._value 获取
let ex1 = () => {
    return maybe.map(x => fp.map(fp.add(1), x))._value;
}
console.log(ex1());
